<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
    <script src="../js/dayjs.min.js"></script>
</head>
<body>
    <div id="root">
        <h1>{{newTime}}</h1>
        <h1>{{time | getTime}}</h1>
    </div>
    
    <script type="text/javascript">
        new Vue({
            el:"#root",
            data:{
                time:1711456701619
            },
            computed:{
                newTime(){
                    return dayjs(this.time).format('YYYY-MM-DD HH:mm:ss')
                }
            },
            filters:{
                getTime(val){
                    return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
                }
            }
        })
    </script>
</body>
</html>